package com.tian.mapper;

import com.tian.dto.ChargeStationGunPageReqDto;
import com.tian.entity.ChargeStationGun;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface ChargeStationGunMapper {

    int insert(ChargeStationGun record);

    ChargeStationGun selectByGunNo(String gunNo);
    ChargeStationGun selectByPrimaryKey(Integer id);

    int updateByPrimaryKey(ChargeStationGun record);

    List<ChargeStationGun> selectByPage(ChargeStationGunPageReqDto chargeStationGunPageReqDto);
    int count(ChargeStationGunPageReqDto chargeStationGunPageReqDto);
    int countOnline();

    ChargeStationGun getRandomAvailable();

    void updateStatus(@Param("id") Integer id, @Param("status") int chargerStatus);
}